/************************************************************************

								Heroes IV
					  Copyright 2000, The 3DO Company

	------------------------------------------------------------------
  						 can_cast.h

	$Header: /heroes4/can_cast.h $

	$NoKeywords: $

 ************************************************************************/

#if !defined( CAN_CAST_H_INCLUDED )
#define CAN_CAST_H_INCLUDED

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include <string>
class  t_abstract_combat_creature;
class  t_battlefield;
class  t_combat_creature;
class  t_combat_creature_list;
struct t_map_point_2d;
enum   t_spell;

bool can_affect( t_spell spell, t_combat_creature const& target );
bool can_affect( t_combat_creature const& caster, t_spell spell, 
				 t_combat_creature const& target  );
// this variation takes abstract creatures, so it can be used in simulated combat.
bool can_affect_target( t_abstract_combat_creature const& caster, t_spell spell, 
						t_abstract_combat_creature const& target );

bool can_cast( t_combat_creature const& caster, 
			   t_spell					spell, 
			   t_combat_creature const& target, 
			   std::string*				help_text = 0 );
bool check_line_of_sight( t_combat_creature const& caster, t_spell spell,
						  t_combat_creature const& target, std::string* help_text );
bool check_line_of_sight( t_combat_creature const& caster, t_spell spell,
						  t_map_point_2d const& point, std::string* help_text );
bool check_song_of_peace( t_combat_creature const& caster, t_spell spell, 
						  std::string* help_text );
bool check_steal_enchantment( t_combat_creature const& caster, t_spell spell );
bool contains_enemies( t_combat_creature const& caster, t_spell spell,
				       t_combat_creature_list const& targets, std::string* help_text );
std::string replace_spell_keywords( std::string const& text, 
								    t_combat_creature const& caster, 
								    t_spell spell, t_combat_creature const* target );


#endif // CAN_CAST_H_INCLUDED
